home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / sysext / init / iconcolo.cpt / Source ƒ / EquIP.txt < prev    next >
Encoding:
Text File  |  1990-02-08  |  3.6 KB  |  125 lines

  1. ; File: EquIP.Txt
  2. ;
  3.  
  4.  
  5. Include        SysEqu.txt
  6.  
  7. DBUG    equ    1
  8.  
  9. ; Estimate of size of code
  10. CODESIZE    equ    4000
  11.  
  12. ; max size of any one cicn is 2048 bytes
  13. MAX_CICN    equ    512
  14. MAX_CTAB    equ    256
  15. MAX_IMAGE    equ    2048
  16.  
  17. ; Length of an ICON resource.
  18. ICN_LENGTH    equ    (32*32)/8
  19.  
  20. ; Offsets within each ICON/cicn record.
  21. ICN_OFFSET    equ    4
  22. CICN_OFFSET    equ    ICN_OFFSET+ICN_LENGTH
  23.  
  24. ; Extra padding to ensure that we don't get "too close" to the end of the
  25. ; storage area.  It is two bytes to account for word-alignment after copying
  26. ; the CICN, plus four bytes for the next-pointer in the following record
  27. ; (which will be set to zero).
  28. PS_PADDING    equ    (4 + 2)
  29.  
  30. ; Private storage record.  This is a block which is allocated on the
  31. ; System Heap and pointed to by A4 during most of the driver's subroutines.
  32. ; The macro DECLARE defines an A4 offset for a variable in this storage
  33. ; record and updates mySize, an assembler variable which is used to keep
  34. ; track of the current total size of the storage record.
  35.  
  36. mySize        set    0
  37.  
  38. macro    DECLARE    name,size =
  39. {name}    equ    mySize
  40. mySize    set    mySize + {size}
  41. |
  42.  
  43. DECLARE    HeadPointer, 4        ; pointer to first icon in the list.
  44.  
  45. DECLARE    TailPointer, 4        ; pointer to first byte after the end of the
  46.                 ; last icon in the list.  This is the same as
  47.                 ; HeadPointer if no icons are present.
  48.  
  49. DECLARE    EndOfStorage, 4        ; pointer to first byte past end of our
  50.                 ; icon-storage area.
  51.  
  52. DECLARE    ResType, 4        ; Type of GetResource
  53. DECLARE    ResID, 2        ; ID of GetResource
  54.  
  55. DECLARE    cicnSize, 4        ; Size of cicn resource
  56.  
  57. DECLARE    icnHandle, 4        ; Temp save for ICN# handle
  58.  
  59. DECLARE    cicnHandle, 4        ; Temp save for cicn handle
  60.  
  61. DECLARE    scratchCicn, 4        ; handle to cicn scratch space
  62. DECLARE    scratchCtab, 4        ; handle to scratch color table
  63. DECLARE    scratchImage, 4        ; handle to scratch cicn image space
  64.  
  65. ; The following are used by PCBPlotIt
  66. ;
  67. DECLARE pcbHeight, 2        ; height of cicn PMap
  68. DECLARE pcbBmapOffset, 2    ; offset for BMapData
  69. DECLARE    pcbCicnLength, 2    ; length of PMap + icon + mask
  70. DECLARE    pcbCTabLength, 2    ; length of cicn color table
  71. DECLARE    pcbImageLength, 2    ; length of cicn image data
  72.  
  73. DECLARE    scratchID, 2        ; space for ID from GetResInfo
  74. DECLARE    scratchType, 4        ; space for type from GetResInfo
  75. DECLARE    scratchName, 256    ; space for name from GetResInfo
  76.  
  77. DECLARE    curPort, 4        ; place to get current port
  78.  
  79. DECLARE    curForeColor, 6        ; Current RGBForeColor
  80. DECLARE    curBackColor, 6        ; Current RGBBackColor
  81.  
  82. DECLARE    selected, 2        ; Flag: is current icon being drawn
  83.                 ; "selected" in the Finder?
  84.  
  85. ; Init icon ID's
  86. goodIconID    equ    128
  87. ramFullIconID    equ    129
  88. badIconID    equ    130
  89.  
  90. Error1ID    equ    131    ; ROM85 negative
  91. Error2ID    equ    132    ; Color QD bit in ROM85 is clear
  92. Error3ID    equ    133    ; User has mouse button or shift key down
  93. Error4ID    equ    134    ; Can't load 'PaTc' resource
  94. Error5ID    equ    135    ; PaTc returned an error
  95. Error6ID    equ    136    ; Couldn't allocate private storage record,
  96.                 ; scratch cicn, scratch ctab, or scratch
  97.                 ; cicn image
  98. Error7ID    equ    137    ; Couldn't load 'sysz' resource
  99. Error8ID    equ    138    ; Illegal (too small) 'sysz' value
  100. Error9ID    equ    139    ; Couldn't allocate main cicn buffer
  101.  
  102. showInitID    equ    -4048    ; ID of ShowInit code resource
  103.  
  104. ; *** end of private storage record ***
  105. ; mySize is now set to the total size of the private storage record
  106.  
  107. ; This is the extra amount that the 'sysz' resource should have, over and
  108. ; above the size of icon data.
  109. SYSZ_EXCESS    equ    CODESIZE+MAX_CICN+MAX_CTAB+MAX_IMAGE+mySize
  110.  
  111. ; This is the extra amount of cicn space we'd like to have after
  112. ; we're done loading the ones in the INIT file itself.
  113. ;
  114. CICN_EXTRA    equ    10000
  115.  
  116. ;
  117. ; trap numbers for patch.asm
  118. ;
  119. GRTrap    equ    $1A0    ; GetResource
  120. PITrap    equ    $14B    ; PlotIcon
  121. CBTrap    equ    $EC    ; CopyBits
  122.  
  123. ; end of EquIP.txt
  124.  
  125.